package com.ai.module.suno.mapper;

import com.ai.module.suno.domain.entity.UserSunoRecordEntity;
import com.ai.module.suno.domain.vo.SunoRecordVo;
import com.ai.module.suno.domain.vo.UserSunoVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserSunoRecordMapper extends BaseMapper<UserSunoRecordEntity> {

    @Select("select  *  from  user_suno where robot_id =#{robotId} and user_id =#{userId}")
    IPage<UserSunoVo> findUserRecord(Page<SunoRecordVo> voPage,
                                     @Param("userId") String userId,
                                     @Param("robotId") String robotId);

    @Select("select  *  from  suno_record where suno_id =#{sunoId}  ")
    SunoRecordVo sunoDetail(String sunoId);

}
